import request from '@/utils/request'

export const  getGoodsList = (params)=>{

    return request({
        method:'get',
        url:'/goods/catelist',
       params
    })
}
// 修改数据库 关于商品信息
export const  updateGood = (data)=>{

    return request({
        method:'post',
        url:'/goods/editcate',
      data
    })
}
// 删除分类
export const  delGoodsCate = (params)=>{

    return request({
        method:'get',
        url:'/goods/delcate',
       params
    })
}
// 添加商品
export const  goodsAdd = (data)=>{

    return request({
        method:'post',
        url:'/goods/add',
      data
    })
}
// 获取商品分类名
export const  getGoodscate = (params)=>{

    return request({
        method:'get',
        url:'/goods/categories',
      params
    })
}
//获取商品列表
export const  getGoodslist= (params)=>{

    return request({
        method:'get',
        url:'/goods/list',
      params
    })
} 
//删除商品
export const delGood = (params)=>{

    return request({
        method:'get',
        url:'/goods/del',
      params
    })
} 
// 修改商品
export const  goodsmodify = (data)=>{

    return request({
        method:'post',
        url:'/goods/edit',
      data
    })
}
// 添加商品分类
export const  goodsaddsort = (data)=>{

  return request({
      method:'post',
      url:'/goods/addcate',
    data
  })
}